﻿<%@ Page Title="Резюме" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Work.UI.Web.Forms.Admin.Resume.Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">


<asp:ObjectDataSource ID="odsResume" runat="server" 
        onobjectcreating="odsResume_ObjectCreating"
        TypeName="Work.BL.Hibernate.Managers.HResumeManager"
        DataObjectTypeName="Work.BL.POCOs.ResumePOCO" 
        StartRowIndexParameterName="startIndex"
        MaximumRowsParameterName="maxCount"       
        SelectCountMethod="GetResumeCount"
        SelectMethod="GetResume"
        DeleteMethod="Delete"
        UpdateMethod="Block"
        EnablePaging="true">

        <DeleteParameters>
            <asp:parameter name="Id" type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:parameter name="Id" type="Int32" />
        </UpdateParameters>
    </asp:ObjectDataSource>


    <asp:GridView ID="grvResume" runat="server"
        DataSourceID="odsResume" AutoGenerateColumns="false"
        AllowPaging="true" PageSize="10" AllowSorting="true" 
        CssClass="GridViewStyle" DataKeyNames="Id" OnRowDeleted="grvResume_OnRowDeleted">

        <FooterStyle CssClass="GridViewFooterStyle" />
        <RowStyle CssClass="GridViewRowStyle" />    
        <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
        <PagerStyle CssClass="GridViewPagerStyle" />
        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
        <HeaderStyle CssClass="GridViewHeaderStyle" />
        
        <Columns>

            <asp:TemplateField HeaderText="#">
                <ItemTemplate>
                    <%# Eval("Id") %>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Title">
                <ItemTemplate>
                    <%# Eval("Title")%>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Дата створення">
                <ItemTemplate>
                    <%# Eval("DateChanges")%>
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Salary">
                <ItemTemplate>
                    <%# Eval("Salary")%>
                </ItemTemplate>
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="Is Visible">
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Eval("IsVisible") %>' Enabled="false" />
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Is Subscribe">
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Eval("IsSubScribe") %>' Enabled="false" />
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="Is Blocked">
                <ItemTemplate>
                    <asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Eval("IsBlocked") %>' Enabled="false" />
                </ItemTemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="" >
                <ItemTemplate>
                
                    <asp:LinkButton ID="lnkbtnUpdate" runat="server" Text="Block" CommandName="Update"/>
                    &nbsp;|&nbsp;
                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/Admin/Resume/Details.aspx?Id=" + Eval("Id") %>'>Details</asp:HyperLink>
                    &nbsp;|&nbsp;

                    <asp:LinkButton ID="LinkButtdson1" CommandName="Delete" runat="server"
                        OnClientClick="return confirm('Are you certain you want to delete this region?');">Delete</asp:LinkButton>
                </ItemTemplate>
            </asp:TemplateField>

        </Columns>

    </asp:GridView>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="contentHeader" runat="server">
Резюме
</asp:Content>